<?php
/**
 * Created by PhpStorm.
 * User: Rodger
 * Date: 2020/8/24
 * Time: 17:36
 */
namespace State;
class Context
{
    private $state;
    
    public function __construct()
    {
        $this->state =  new ConcreteAbstractStateA();
    }
    
    public function getState()
    {
        return $this->state;
    }
    
    public function setState(AbstractState $state)
    {
        $this->state = $state;
    }
    
    public function Handle()
    {
        $this->state->Handle($this);
    }
    
}